package com.xs.shop.user.feign.api;

import com.xs.shop.common.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@Component
@FeignClient(name="shop-user",contextId = "shop-user")
public interface UserClient {
    @GetMapping("/admin/checkToken")
    public Result<Boolean> checkToken();

    @GetMapping("/member/getMemberIdByToken")
    public Result<Long> getMemberIdByToken();

    @GetMapping("/memberInfo/getMemberTotalPoint")
    public Result<Integer> getMemberTotalPoint(@RequestParam("memberId") Long memberId);

    @GetMapping("/memberInfo/updatePointWhenMemberAct")
    public Result<Boolean> updatePointWhenMemberAct(
            @RequestParam("value") Integer value,
            @RequestParam("status") Integer status);
}
